1. Field of the Invention
The present invention relates to methods of compression and expansion of a dot pattern consisting of a number of dots arranged in a matrix configuration.
2. Description of the Prior Art
A so-called dot printer such as a wire or stylus type of dot printer or the like is provided with a character generator or memory for storing therein a dot pattern with which a character is represented by a number of dots arranged in a matrix configuration which is of a length of 17 dots and a breadth of 17 dots, and includes in total 289 dots, for example. The dot pattern stored in the memory is represented in such a manner that a dot to be printed is represented by "1" and a dot not to be printed is represented by "0", and the dot pattern is stored based on data in each column. When a printing of a character is performed, a dot pattern is read out from the memory in units of columns to drive printing wires provided on a printing head, so that a desired printing is carried out.
A printing head of the dot printer is generally so arranged that a plurality of printing wires are disposed in a vertical direction. For instance, nine printing wires may be disposed in a vertical direction. In a case where a so-called NLQ character represented by 17 dots.times.17 dots is printed using such a printing head, the printing head is scanned twice in a main scanning direction or a horizontal direction every printing of one character (one line corresponding). Specifically, length 17 dots are divided into two blocks so as to perform printing of odd rows in a first scanning and printing of even rows in a second scanning.
According to NLQ character, the maximum number of dots on each column of a dot pattern represented by 17 dots.times.17 dots for characters, symbols and so on is limited within 13 dots. Regarding for instance, English small letter "j", its lowest dots are lowered 4 dots. That is, the lowest dots are located at the 17th row dot position and be treated as a so-called descender letter. Mixing of such a descender letter makes it possible to provide a good balance of a printing result.
It is necessary for the memory to store various dot patterns corresponding to many characters, and thus it is necessary to prepare a large capacity of memory if the amount of data of the individual dot pattern is great. Consequently, there is employed such a method that a dot pattern is subjected to compression processing to store a memory. And when a printing is performed, the dot pattern is subjected to expansion processing to obtain an original dot pattern.
FIG. 3 shows a dot pattern of an ordinary descender letter. The figure is directed to a descender letter of English small letter "j" represented by a dot pattern of 17 dots.times.17 dots. In the figure, there are arranged printing dots in such a manner that two or more printing dots do not continue in a main scanning direction or a lateral direction. In other words, there is no such an occasion that two or more continuous printing dots, represented in the figure by dark circles, are arranged in an individual row. Hereinafter, it is so defined that in the dot pattern, dots included in an individual row are referred to as a row dot pattern and dots included in an individual column are referred to as a column dot pattern.
The reason why the dot patterns are arranged in such a manner that two or more printing dots are not adjacent in a main scanning direction is that a high speed printing is realized. The detailed reason will be described hereinafter.
When a printing length of wire, or stylus, of a printing head of the wire dot printer is driven, the printing wire protrudes from a home position to print a dot on a printing sheet at a predetermined position and returns to the home position. This operation is repeated. When the same printing wire is continuously driven, the driving is performed after waiting for the printing wire to return to the home position. The reason why this is done is that if a new driving is carried out while the printing wire has not yet returned to the home position, it is impossible to supply a sufficient driving force to the printing wire. That is, there is provided no constant pressing force of the printing wire for pressing a printing sheet. This causes unevenness in density of the printing dots and so on. In order to avoid such a situation, the driving of the printing wire is to be performed in a constant condition.
In a case where a printing is performed, on the other hand, there may exist printing wires which are not driven in printing of a certain column. Such printing wires are ready to immediately operate for printing of the adjacent column. Consequently, there is no need for the waiting for return of the printing wire driven in printing of a certain column to the home position. In other words, it is permitted, while the printing wire driven in a certain column is going to return to the home position, to carry out the printing of the adjacent column. Such a driving of the printing wire may be realized by means of arranging the printing dots in such a manner that two or more printing dots are not adjacent in a main scanning direction. Thus, there is provided the dot pattern as shown in FIG. 3.
Assume, for example, that the printing at column 11, row 16 has been completed. Thus, the printing at column 12 will be performed next. In this case, if it is assumed that there is a dot at column 12, row 16, for example, it is impossible to perform the printing without waiting for return to the home position of the printing wire driven in printing of column 11th. However, it is possible to immediately perform the printing of a dot at column 12, row 14, since there is no printing dot at column 11, row 14.
There are proposed various compression methods of compression of a dot pattern. There is known a method as disclosed in, for example, Japanese Patent Laid-Open Gazette 62-30052/1987, in which information indicating variation of individual column dot patterns is stored. Specifically, only column dot pattern, which is different from that of the adjacent column, is stored in a memory, thereby reducing the amount of data per character.
If such a compression method is applied to the dot pattern as shown in FIG. 3, it would be impossible to expect a sufficient compression and thus to reduce the amount of data. That is, no compression is performed on columns in each of which there exists a printing dot, and compression is performed on only the 14th-17th columns in each of which there exists no printing dot. In effect, there are only 4 columns which are subjected to compression of the column dot data. This is because the dot patterns are arranged in such a manner that two or more printing dots not continue or are not adjacent in a main scanning direction and the column dot patterns in adjacent columns are always different from each other, except when there is no dot pattern in adjacent columns.
As stated above, it is impossible to expect effects of the compression on the dot patterns which are arranged in such a manner that two or more printing dots are not adjacent in a main scanning direction.